Skip to content

Add option to indicate that we want the response to be streamed - #124

Merged
Pathoschild merged 4 commits into
Pathoschild:developfrom
Jericho:stream_response
May 12, 2024
Merged

Pathoschild merged 4 commits into
Pathoschild:developfrom
Jericho:stream_response

Conversation

@Jericho

@Jericho Jericho commented Apr 22, 2024

Copy link
Copy Markdown
Contributor

Resolves #123

@Pathoschild

Pathoschild commented May 12, 2024 •

Copy link
Copy Markdown
Owner

Thanks! I assume the underlying client uses an enum to allow for more values in the future. While the bool streamResponse option is simpler, should we expose the enum instead to match the base client (since it's meant to be a thin wrapper)?

For example, it would look something like this:

IResponse response = await client
    .GetAsync("endpoint")
    .WithOptions(completeWhen: HttpCompletionOption.ResponseHeadersRead);

@Pathoschild
Pathoschild self-requested a review May 12, 2024 00:50
@Pathoschild Pathoschild added this to the 4.4.0 milestone May 12, 2024
@Jericho

Jericho commented May 12, 2024

Copy link
Copy Markdown
Contributor Author

No objection. Pushing an update with these changes in a few minutes...

@Pathoschild
Pathoschild merged commit b7e868b into Pathoschild:develop May 12, 2024
@Pathoschild

Copy link
Copy Markdown
Owner

Merged into develop for the upcoming FluentHttpClient 4.4.0. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow HttpCompletionOption to be specified when dispatching a request

2 participants